﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModifyBudget.aspx.cs" Inherits="BudgetSet.ModifyBudget" %>

<%@ Register Src="../../Processes/ProcessControl/UserInfo.ascx" TagName="UserInfo" TagPrefix="ui" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script type="text/javascript" language="javascript"></script>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../../js/common.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../js/My97DatePicker/WdatePicker.js"></script>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link href="CSS/reportCss.css" rel="stylesheet" type="text/css" /> 
        
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            ChooseBudgetType(document.getElementById("hf_BudgetType").value);
        });

        function ChooseBudgetType(ee) {
            if (ee == "E") {
                document.getElementById("hf_BudgetType").value = "E";

                document.getElementById("fld_ACCOUNTCODE").disabled = false;
                document.getElementById("fld_ACCOUNTDESC").disabled = false;
                document.getElementById("fld_DETAILACCOUNTCODE").disabled = false;
                document.getElementById("fld_DETAILACCOUNTDESC").disabled = false;

                document.getElementById("fld_COSTCATEGORY1").disabled = true;
                document.getElementById("fld_COSTCATEGORY2").disabled = true;
                document.getElementById("fld_OWNER").disabled = true;
                document.getElementById("fld_LIFE").disabled = true;
                document.getElementById("fld_QTY").disabled = true;
                document.getElementById("fld_DH").disabled = true;
                document.getElementById("fld_RECLASS").disabled = true;

                //修改界面台账已用金额不允许修改
                document.getElementById("fld_CAPEXBALANCE").disabled = true;
                document.getElementById("fld_PRBALANCE").disabled = true;
                document.getElementById("fld_POBALANCE").disabled = true;
            } else if (ee == "C") {
                document.getElementById("hf_BudgetType").value = "C";

                document.getElementById("fld_ACCOUNTCODE").disabled = true;
                document.getElementById("fld_ACCOUNTDESC").disabled = true;
                document.getElementById("fld_DETAILACCOUNTCODE").disabled = true;
                document.getElementById("fld_DETAILACCOUNTDESC").disabled = true;

                document.getElementById("fld_COSTCATEGORY1").disabled = false;
                document.getElementById("fld_COSTCATEGORY2").disabled = false;
                document.getElementById("fld_OWNER").disabled = false;
                document.getElementById("fld_LIFE").disabled = false;
                document.getElementById("fld_QTY").disabled = false;
                document.getElementById("fld_DH").disabled = false;
                document.getElementById("fld_RECLASS").disabled = false;

                //修改界面台账已用金额不允许修改
                document.getElementById("fld_CAPEXBALANCE").disabled = true;
                document.getElementById("fld_PRBALANCE").disabled = true;
                document.getElementById("fld_POBALANCE").disabled = true;
            } else { }
        }


        function closeWin() {
            window.opener = null;
            window.open('', '_self');
            window.close();
            return false;
        }

    </script>

<style>
.td-label2
{
	text-align: right !important;
	background-color: #f5f5f5;
	width:350px;
}
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="container">
        <table>
        <tr>
            <td rowspan="3" width="150">
                <asp:Image ID="Image2" runat="server" ImageUrl="../../images/vastlogo.png" Visible="true" />
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td style="text-align: center; padding-top: 10px;">
                <span style="font-weight: bold; font-size: 25px">Modify Budget 修改预算记录 </span>
            </td>
            <td>
            </td>
        </tr>
        </table>
        <div class="row">    
            <table class="table table-condensed table-bordered">    
                <tr>
                    <td class="banner" colspan="4">
                        Add Budget/添加预算信息
                    </td>
                </tr>
                <tr>  
                    <td ID="lbl_BUDGETTYPE"class="td-label2">
                        Budget Type/预算类型 <span class="red">*</span>   
                    </td>  
                    <td class="td-content" colspan="3"> 
                        <input id="RadioExpense" type="radio" name="CheckType" runat ="server" value="E" onclick="ChooseBudgetType(this.value)"/>Expense/费用类
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <input id="RadioCapex" type="radio" name="CheckType" runat ="server" value="C" onclick="ChooseBudgetType(this.value)"/>Capex/固定资产类
                    </td>  
                </tr>   
                <tr>  
                <td ID="lbl_STARTTIME" class="td-label2">
                        Start Time/开始时间<span class="red">*</span>
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_STARTTIME" runat="server" OnClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" CssClass="Wdate validate[required,custom[date]]"></asp:TextBox>
                </td>
                <td ID="lbl_ENDTIME" class="td-label2">
                        End Time/结束时间<span class="red">*</span>
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_ENDTIME" runat="server" 
                        OnClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})" 
                        CssClass="Wdate validate[required,custom[date]]" ></asp:TextBox>
                </td> 
                </tr> 
                <tr>    
                <td ID="lbl_BUDGETCODE" class="td-label2">
                        Budget Code/预算编号<span class="red">*</span>
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_BUDGETCODE" runat="server"></asp:TextBox>
                </td>  
                <td ID="lbl_DEPARTMENT" class="td-label2">
                    Budget Department/预算部门<span class="red">*</span>
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_DEPARTMENT" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td class="td-label2">
                       Budget Number/项目代码<span class="red">*</span> 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_ITEMSCODE" runat="server"></asp:TextBox>
                </td>  
                <td class="td-label2">
                        Expense Items/项目描述<span class="red">*</span> 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_ITEMSDESC" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td class="td-label2">
                        Cost Center/成本中心<span class="red">*</span> 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_COSTCENTER" runat="server"></asp:TextBox>
                </td>  
                <td class="td-label2">
                         Cost Center Name/成本中心名称<span class="red">*</span> 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_COSTCENTERNAME" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td id="td_COSTCATEGORY1" class="td-label2">
                        Cost Category/成本类别1 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_COSTCATEGORY1" runat="server"></asp:TextBox>
                </td>  
                <td id="td_COSTCATEGORY2" class="td-label2">
                        Cost Category/成本类别2 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_COSTCATEGORY2" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td class="td-label2">
                        Account Code/账户代码
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_ACCOUNTCODE" runat="server"></asp:TextBox>
                </td>  
                <td class="td-label2">
                        Account Description/账户描述
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_ACCOUNTDESC" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td class="td-label2">
                        Detail Account Code/明细账户代码
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_DETAILACCOUNTCODE" runat="server"></asp:TextBox>
                </td>  
                <td class="td-label2">
                        Detail Account Description/明细账户描述
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_DETAILACCOUNTDESC" runat="server"></asp:TextBox>
                </td>  
                </tr>
                <tr>  
                <td class="td-label2">
                        Reasons/原因
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_REASONS" runat="server" TextMode="MultiLine" Height="60px"></asp:TextBox>
                </td>
                <td class="td-label2">
                        Description/描述
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_DESCRIPTION" runat="server" TextMode="MultiLine" Height="60px"></asp:TextBox>
                </td>
                </tr>
                <tr>  
                <td class="td-label2">
                        Owner/拥有者
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_OWNER" runat="server"></asp:TextBox>
                </td>
                <td class="td-label2">
                        Life/折旧年限
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_LIFE" runat="server"  text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox>  
                    <asp:Label ID="Label1" runat="server" Text="年"></asp:Label>
                </td>
                </tr>
                <tr>  
                <td class="td-label2">
                        Qty/数量
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_QTY" runat="server" text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox>  
                </td>
                <td class="td-label2">
                        Amount/预算金额<span class="red">*</span> 
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_AMOUNT" runat="server"  text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))||(event.keyCode==46)) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox> 
                </td>
                </tr>
                <tr>  
                <td class="td-label2">
                        CapexBalance/Capex已用金额
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_CAPEXBALANCE" runat="server" text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))||(event.keyCode==46)) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox> 
                </td>
                <td class="td-label2">
                        PRBalance/PR已用金额
                <td class="td-content">
                    <asp:TextBox ID="fld_PRBALANCE" runat="server" text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))||(event.keyCode==46)) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox> 
                </td>
                </tr>
                <tr>  
                <td class="td-label2">
                        POBalance/PO已用金额
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_POBALANCE" runat="server" text="0"
                    OnKeyPress="if(((event.keyCode>=48)&&(event.keyCode <=57))||(event.keyCode==46)) {event.returnValue=true;} else{event.returnValue=false;}" MaxLength="15"> </asp:TextBox> 
                </td>
                <td class="td-label2">
                        DH/DH
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_DH" runat="server"></asp:TextBox>
                </td>
                </tr>
                <tr>  
                <td class="td-label2">
                        RECLASS/RECLASS
                </td>
                <td class="td-content">
                    <asp:TextBox ID="fld_RECLASS" runat="server" TextMode="MultiLine" Height="60px"></asp:TextBox>
                </td>             
            </table>
        </div>
        <div>
            <input id="hf_BudgetType" runat="server" type="hidden" />
        </div>   
        <div align="center">
            <asp:Button ID="btnSave" runat="server" Text="Save/保存" CssClass="btn" OnClick="btnSave_Click"/>
            <asp:Button ID="btnClose" runat="server" Text="Close/关闭" CssClass="btn" OnClientClick="closeWin()" />
        </div>
    </div>
    </form>
</body>
</html>
